package com.ruoyi.lm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lm.mapper.LmWithdrawrecordMapper;
import com.ruoyi.lm.domain.LmWithdrawrecord;
import com.ruoyi.lm.service.ILmWithdrawrecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户提现记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-02
 */
@Service
public class LmWithdrawrecordServiceImpl implements ILmWithdrawrecordService 
{
    @Autowired
    private LmWithdrawrecordMapper lmWithdrawrecordMapper;

    /**
     * 查询用户提现记录
     * 
     * @param id 用户提现记录ID
     * @return 用户提现记录
     */
    @Override
    public LmWithdrawrecord selectLmWithdrawrecordById(String id)
    {
        return lmWithdrawrecordMapper.selectLmWithdrawrecordById(id);
    }

    /**
     * 查询用户提现记录列表
     * 
     * @param lmWithdrawrecord 用户提现记录
     * @return 用户提现记录
     */
    @Override
    public List<LmWithdrawrecord> selectLmWithdrawrecordList(LmWithdrawrecord lmWithdrawrecord)
    {
        return lmWithdrawrecordMapper.selectLmWithdrawrecordList(lmWithdrawrecord);
    }

    /**
     * 新增用户提现记录
     * 
     * @param lmWithdrawrecord 用户提现记录
     * @return 结果
     */
    @Override
    public int insertLmWithdrawrecord(LmWithdrawrecord lmWithdrawrecord)
    {
        lmWithdrawrecord.setId(IdWorker.getId());
        lmWithdrawrecord.setCreateTime(DateUtils.getNowDate());
        return lmWithdrawrecordMapper.insertLmWithdrawrecord(lmWithdrawrecord);
    }

    /**
     * 修改用户提现记录
     * 
     * @param lmWithdrawrecord 用户提现记录
     * @return 结果
     */
    @Override
    public int updateLmWithdrawrecord(LmWithdrawrecord lmWithdrawrecord)
    {
        return lmWithdrawrecordMapper.updateLmWithdrawrecord(lmWithdrawrecord);
    }

    /**
     * 删除用户提现记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLmWithdrawrecordByIds(String ids)
    {
        return lmWithdrawrecordMapper.deleteLmWithdrawrecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户提现记录信息
     * 
     * @param id 用户提现记录ID
     * @return 结果
     */
    @Override
    public int deleteLmWithdrawrecordById(String id)
    {
        return lmWithdrawrecordMapper.deleteLmWithdrawrecordById(id);
    }
}
